$("#form_hotel input[type=text], #form_tour_day select").removeClass("field-with-errors")
$("#form_tour_day .error-message").html("").removeClass("red")

<% if @tour_day.errors.any? %>
  <% flash[:alert] = ' Something missing, Please check again!' %>
  $("#flash_message_wrapper").html("<%=j render partial: 'layouts/flash_messages' %>"); 
  $('#prerequisites').collapse('toggle');
  <% @tour_day.errors.each do | field, message| %>
    $("#<%=j field.to_s %>_error").html("<%=j message %>").addClass("red");
  <% end %>
<% else %>
  $('#admin_title').html("<%= j 'Manage Tour Days' %>");
  $('#admin_content').html("<%= j render partial: 'tour_days/index', locals: { :tour_days => @tour_days, tid: @tour_day.tour_id } %>")
  <% flash[:notice] = ' tour_day Room Type successfully created' %>
<% end %>

